"""
打印正三角形
*
**
***
****
*****

        *    空格
   *    1     3
  ***   3     2
 *****  5     1
******* 7     0

"""
i = 1
while i <= 4:
    print('-' * (4 - i), end='')
    print('*' * (2 * i - 1),end='\n')
    i += 1


print('-' * 30)
i = 1
while i <= 4:
    print(' ' * (4 - i), end='')
    j = 1
    while j <= (2 * i - 1):
        print('*' ,end='')
        j += 1
    print()
    i += 1

print('-' * 30)



i = 1
while i <= 5:  # 行数
    j = 1
    while j <= i:
        print('*', end='')
        j += 1
    print()
    i += 1

print('-' * 30)

i = 1
while i <= 5:
    print('*' * i, end='\n')
    i += 1

print('-' * 30)
